<div id="main">

    <b>Điều hướng:</b>
    <br />
    [ <a href="<?php echo Utility::getSiteUrl(); ?>/managequestions/index">Giáo viên: <?php echo $lectureID; ?></a> ]
    > [ <b><a href="<?php echo Utility::getSiteUrl(); ?>/managequestions/index/<?php echo $subjectID; ?>">Môn học: <?php echo $subjectID; ?></a></b> ]

    <br />
    <form name='sections' id='sections' action='<?php echo Utility::getSiteUrl(); ?>/managequestions/index' method='post'>
    <br />

    <table border='1'  width='500'>
        <thead>
            <tr>
                <th width='100'>Mã phần</th>
                <th width='400'>Tên phần</th>
                <th width='100'>Trọng số</th>
            </tr>
        </thead>
        <tbody>
            <?php
             if(count($sections)==0)
            {
                ?>
                <tr>
                    <td colspan="3" style="text-align:center;color:red">Chưa có chương nào</td>
                </tr>
                <?php
            }
            else
            
            foreach($sections as $section)
            {
                ?>
                <tr>
                    <td><center><b><?php echo $section->id; ?></b></center></td>
                    <td><center><b><a href="<?php echo Utility::getSiteUrl(); ?>/managequestions/index/<?php echo $subjectID; ?>/<?php echo $section->id; ?>"><?php echo $section->name; ?></a></b></center></td>
                    <td><center><?php echo $section->weight; ?></center></td>
                <?php
            }
            ?>
        </tbody>
    </table>
    </form>
</div>